package com.lx.oms.controller.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

import com.lx.oms.common.utils.CommonUtils;

/**
 * 类别
 * @author houzhong
 *
 */
public class SysCategoryEntity implements Serializable{

	
	private static final long serialVersionUID = 1L;
	
	private String id;
	
	/**
	 * 知否删除
	 */
	private Short active;
	
	/**
	 * 类别id
	 */
	private String categoryId;
	
	/**
	 * 父类id
	 */
	private String parentId;
	
	/**
	 * 父级名称
	 */
	private String parentName;
	
	/**
	 * 类别名称
	 */
	private String name;
	
	/**
	 * 类型   0：目录   1：菜单 
	 */
	private Integer type;
	
	/**
	 * 排序
	 */
	private Integer orderNum;
	
	/**
	 * 状态，1：显示，0：隐藏
	 */
	private Integer status;
	
	/**
	 * 链接
	 */
	private String url;
	
	/**
	 * 备注
	 */
	private String remark;
	
	/**
	 * 创建时间
	 */
	private Timestamp createTime;
	
	/**
	 * 修改时间
	 */
	private Timestamp modifyTime;
	
	/**
	 * ztree属性
	 */
	private Boolean open;
	
	private Boolean isParent;
	
	private Integer size;
	
	private List<?> list;

	public SysCategoryEntity() {
		super();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Short getActive() {
		return active;
	}

	public void setActive(Short active) {
		this.active = active;
	}

	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	public Timestamp getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Timestamp modifyTime) {
		this.modifyTime = modifyTime;
	}

	public Boolean getOpen() {
		return open;
	}

	public void setOpen(Boolean open) {
		this.open = open;
	}

	public Boolean getIsParent() {
		return isParent;
	}

	public void setIsParent(Boolean isParent) {
		this.isParent = isParent;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public List<?> getList() {
		return list;
	}

	public void setList(List<?> list) {
		this.list = list;
	}

	public void checkParent() {
		if(CommonUtils.isIntThanZero(this.size)) {
			this.isParent = true;
		} else {
			this.isParent = false;
		}
	}
	
	public void checkParentName() {
		if(this.parentId.equals("0")) {
			this.parentName = "一级菜单";
		}
	}
	

}
